//@version=3
study(title="GDAX EMA Cross[26,12]",shorttitle ="GDAX EMA", overlay=true)
short = ema(close, 12)
long = ema(close, 26)
plota = plot(short, color = #6f92ce, linewidth=2, title="Ema 12", editable = true)
plot(long, color = #e08937, linewidth=2, title="Ema 26", editable = true)
plot (cross(short, long) ? short : na, style = circles, color = red,  linewidth = 4, title="Cross", trackprice = false)
trendup= long <= short
trendDn= long > short
emaUpColor() => trendup
emaDownColor() => trendDn
col = trendup ? blue : trendDn ? red : white
barcolor(emaUpColor() ? blue: emaDownColor() ? red : na, title="Highlights Trend")